package com.naiterui.ehp.bs.doctor.service;

import com.naiterui.common.repository.page.PageParamVO;
import com.naiterui.common.repository.page.PageVO;
import com.naiterui.ehp.bp.bo.form.DesignFormBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.doctor.dto.DrFollowUpRecordDTO;
import com.naiterui.ehp.bs.doctor.vo.followup.AdCalendarPointVO;
import com.naiterui.ehp.bs.doctor.vo.followup.AdVisitSettingVO;
import com.naiterui.ehp.bs.doctor.vo.followup.AdVisitVO;
import com.naiterui.ehp.bs.doctor.vo.followup.DrFollowUpFormTypeVO;
import com.naiterui.ehp.bs.doctor.vo.followup.DrFollowUpFormVO;
import com.naiterui.ehp.bs.doctor.vo.followup.DrFollowUpRecordFormVO;
import com.naiterui.ehp.bs.doctor.vo.followup.DrFollowUpRecordVO;
import com.naiterui.ehp.bs.doctor.vo.followup.DrFollowUpSubVisitVO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 随访计划
 *
 * @author yangfuya
 * @since 2022/1/5
 */
public interface IDrFollowUpRecordService {

    /**
     * 分页获取随访集合列表
     *
     * @param doctorId
     * @param status
     * @param inquirerName
     * @param pageParamVO
     * @return
     * @throws BusinessException
     */
    PageVO<DrFollowUpRecordVO> page(Long doctorId, Integer status, String inquirerName, String sort,
                                    PageParamVO pageParamVO)
            throws BusinessException;

    /**
     * 获取随访表单类型
     *
     * @return
     * @throws BusinessException
     */
    List<DrFollowUpFormTypeVO> getFollowUpFormTypeList() throws BusinessException;

    /**
     * 分页获取随访表单集合列表
     *
     * @param doctorId
     * @param type
     * @param pageParamVO
     * @return
     * @throws BusinessException
     */
    PageVO<DrFollowUpFormVO> followUpFormPage(Long doctorId, Integer type, String formName, PageParamVO pageParamVO)
            throws BusinessException;

    /**
     * 获取随访计划详情
     *
     * @param id
     * @return
     * @throws BusinessException
     */
    DrFollowUpRecordVO getById(Long id) throws BusinessException;

    /**
     * 根据随访表单id切换表单
     *
     * @param followUpRecordFormId 随访任务表单id
     * @return
     * @throws BusinessException
     */
    DrFollowUpRecordFormVO switchForm(Long followUpRecordFormId) throws BusinessException;

    /**
     * 新增随访计划
     *
     * @param drFollowUpRecordDTO
     * @throws BusinessException
     */
    void save(DrFollowUpRecordDTO drFollowUpRecordDTO) throws BusinessException;

    /**
     * 删除随访计划
     *
     * @param id
     * @throws BusinessException
     */
    void delete(Long id) throws BusinessException;

    /**
     * 预览form表单
     *
     * @param followUpFormId
     * @return
     * @throws BusinessException
     */
    DesignFormBO viewForm(Long followUpFormId) throws BusinessException;

    /**
     * 获取包含多个复诊计划的详情
     *
     * @param followNo
     * @return
     */
    List<DrFollowUpSubVisitVO> getSubsequentVisitByFollowNo(String followNo) throws BusinessException;

    /**
     * 医生主动选择已报道或者取消
     *
     * @param settingVO
     * @throws BusinessException
     */
    void updateVisitRecordStatus(AdVisitSettingVO settingVO) throws BusinessException;

    PageVO<AdVisitVO> getVisitTodayPage(Long doctorId, String date, PageParamVO pageParamVO) throws BusinessException;

    List<AdCalendarPointVO> getMonthVisit(Long doctorId, String month) throws BusinessException;

    List<Map<String, Object>> getOption();

    DesignFormBO getDesignFormDataBO(String formId, String businessId) throws BusinessException;

    void updateVisitCompleteStatus(Long doctorId, Long patientId, Date consultTime, Integer consultType, String roomId, Long videoConsultId) throws BusinessException;
}
